Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bootstrap stripe webhook #59

Closed
wants to merge 1 commit into from
Closed

feat: bootstrap stripe webhook #59

wants to merge 1 commit into from

Conversation

davideimola
Copy link
Member

@davideimola davideimola commented Apr 26, 2024

πŸ”— Linked issue

Closes #46
Closes #49

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@davideimola
Copy link
Member Author

@LobeTia this is the first draft I made, check if the flow is respecting what we need.

@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "MembershipStatus" ADD VALUE 'WAITING';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use pending ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to think about it... I am not sure also it is the right name, but it is something like, when you create a membership it isn't paid yet. So, I think a different status just to differentiate from who's paid and its waiting for approval and other users that they didn't have finished their payment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid of having orphans member in these scenario. It could be helpful to have a column per member to identify the payment status as it could be unrelated from the member status as it is a consequence (especially in a renewal case).

To me the waiting status is an over head

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have lastPaymentAt which ensures the subscription has been successfully paid... I don't know what can be better when we operate with those users.

@TheJoin95
Copy link
Member

@davideimola news on this?

@@ -41,6 +41,7 @@
"next": "^14.1.3",
"next-auth": "^4.24.6",
"nodemailer": "^6.9.13",
"pino": "^9.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this as it's not part of this PR. The issue regarding logs is going to be addressed with a monitoring platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a json logging library Stripe subscription webhook updates membership
2 participants